import { S } from '../../s';
import { IPSRawItemBase } from '../ipsraw-item-base';
import { IPSRawItemContainer } from '../ipsraw-item-container';
import { IPSSysPanelRawItem } from './ipssys-panel-raw-item';
import { PSSysPanelItemImpl } from './pssys-panel-item-impl';

export class PSSysPanelRawItemImpl
  extends PSSysPanelItemImpl
  implements IPSSysPanelRawItem, IPSRawItemContainer
{
  get contentType(): string {
    return this.M.contentType;
  }

  get cssStyle(): string {
    return this.M.cssStyle;
  }

  get dynaClass(): string {
    return this.M.dynaClass;
  }

  get htmlContent(): string {
    return this.M.htmlContent;
  }

  protected psrawitem: IPSRawItemBase;
  getPSRawItem(): IPSRawItemBase | null {
    return (
      this.psrawitem ||
      (this.psrawitem = this.fillObjectModel(
        S._3ae,
        this.M.getPSRawItem,
        S._3bc,
      ) as IPSRawItemBase)
    );
  }

  get rawContent(): string {
    return this.M.rawContent;
  }

  get rawItemHeight(): number {
    return this.M.rawItemHeight != null ? this.M.rawItemHeight : 0.0;
  }

  get rawItemWidth(): number {
    return this.M.rawItemWidth != null ? this.M.rawItemWidth : 0.0;
  }
  get cls(): string {
    return 'PSSysPanelRawItemImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._bd || cls == S._3ba || cls == S._18e || cls == S._18f)
      return true;
    return super.instanceof(cls);
  }
}
